#include <stdio.h>

int main()
{
	int a[10]={2,4,6,8,10,12,14,16,18,20};
	int *p = a,m,n,i,temp;
	printf("please input from m,how many n:");
	scanf("%d%d",&m,&n);
	for(i=0;i<m-1;i++)
		p++;
	for(i=0;i<n/2;i++)
	{
		temp = *p;
		*p = *(p+(n-1)/(i+1));
		*(p+(n-1)/(i+1)) =temp;
		p++;
	}
	for(i=0;i<10;i++)
		printf("%d ",a[i]);
	printf("\n");
}
